package neuron;

import java.io.Serializable;
import java.util.ArrayList;

import common.statistics.Series;

public class NetworkStatisticsProxy extends NetworkStatistics implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -7697313407068542079L;
	
	
	public Series bTS, bAsym, bTSLen, bISLen, bBA, bTA;
	public Series tTS, tAsym, tTSLen, tISLen, tBA, tTA;
	public Series oTS, oAsym, oTSLen, oISLen, oBA, oTA;
	
	
	public NetworkStatisticsProxy(NetworkStatistics stats) {
		super(new ArrayList<Network>());
		
		bTS = stats.basalTermSegCountDist();
		bAsym = stats.basalAsymIndexDist();
		bTSLen = stats.basalTermSegLenDist();
		bISLen = stats.basalIntSegLenDist();
		bBA = stats.basalBranchingAngles();
		bTA = stats.basalTurningAngles();

		tTS = stats.tuftTermSegCountDist();
		tAsym = stats.tuftAsymIndexDist();
		tTSLen = stats.tuftTermSegLenDist();
		tISLen = stats.tuftIntSegLenDist();
		tBA = stats.basalBranchingAngles();
		tTA = stats.basalTurningAngles();

		oTS = stats.obliqueTermSegCountDist();
		oAsym = stats.obliqueAsymIndexDist();
		oTSLen = stats.obliqueTermSegLenDist();
		oISLen = stats.obliqueIntSegLenDist();
		oBA = stats.basalBranchingAngles();
		oTA = stats.basalTurningAngles();
	}

	
	
	@Override
	public Series basalTermSegCountDist() {
		return bTS;
	}

	@Override
	public Series basalAsymIndexDist() {
		return bAsym;
	}

	@Override
	public Series basalTermSegLenDist() {
		return bTSLen;
	}

	@Override
	public Series basalIntSegLenDist() {
		return bISLen;
	}


	
	@Override
	public Series obliqueTermSegCountDist() {
		return oTS;
	}

	@Override
	public Series obliqueAsymIndexDist() {
		return oAsym;
	}

	@Override
	public Series obliqueTermSegLenDist() {
		return oTSLen;
	}

	@Override
	public Series obliqueIntSegLenDist() {
		return oISLen;
	}
	
	
	
	@Override
	public Series tuftTermSegCountDist() {
		return tTS;
	}

	@Override
	public Series tuftAsymIndexDist() {
		return tAsym;
	}

	@Override
	public Series tuftTermSegLenDist() {
		return tTSLen;
	}

	@Override
	public Series tuftIntSegLenDist() {
		return tISLen;
	}


	public static abstract class Selector {
		public abstract Series get(NetworkStatisticsProxy p);
	}
	public static Selector basalTS = new Selector() {
		public Series get(NetworkStatisticsProxy p) { return p.bTS; }
	};
	public static Selector basalAsym = new Selector() {
		public Series get(NetworkStatisticsProxy p) { return p.bAsym; }
	};
	public static Selector basalTSLen = new Selector() {
		public Series get(NetworkStatisticsProxy p) { return p.bTSLen; }
	};
	public static Selector basalISLen = new Selector() {
		public Series get(NetworkStatisticsProxy p) { return p.bISLen; }
	};
	public static Selector tuftTS = new Selector() {
		public Series get(NetworkStatisticsProxy p) { return p.tTS; }
	};
	public static Selector tuftAsym = new Selector() {
		public Series get(NetworkStatisticsProxy p) { return p.tAsym; }
	};
	public static Selector tuftTSLen = new Selector() {
		public Series get(NetworkStatisticsProxy p) { return p.tTSLen; }
	};
	public static Selector tuftISLen = new Selector() {
		public Series get(NetworkStatisticsProxy p) { return p.tISLen; }
	};
	public static Selector obliqueTS = new Selector() {
		public Series get(NetworkStatisticsProxy p) { return p.oTS; }
	};
	public static Selector obliqueAsym = new Selector() {
		public Series get(NetworkStatisticsProxy p) { return p.oAsym; }
	};
	public static Selector obliqueTSLen = new Selector() {
		public Series get(NetworkStatisticsProxy p) { return p.oTSLen; }
	};
	public static Selector obliqueISLen = new Selector() {
		public Series get(NetworkStatisticsProxy p) { return p.oISLen; }
	};

}
